home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1993 July / Internet Tools.iso / RockRidge / info-service / gopher / Rice_CMS / gopher24 / gopcligv.$rexx < prev    next >
Encoding:
Text File  |  1993-01-25  |  5.1 KB  |  65 lines

  1. /*                                                                      00010000
  2.  *        Name: GOPCLIGV REXX                                           00020000
  3.  *              VM TCP/IP Network GOPHER Client graphics viewer         00030000
  4.  *              This file is part of CMS Gopher and not part of VMGIF.  00040000
  5.  *      Author: Rick Troth, Rice University, Information Systems        00050000
  6.  *        Date: 1992-Dec-23                                             00060000
  7.  *                                                                      00070000
  8.  *        Note: the first record must be at least long enough           00080000
  9.  *              to identify the graphics format (magic number)          00090000
  10.  */                                                                     00100000
  11.                                                                         00110000
  12. /*                                                                      00120000
  13.  *      Copyright 1992 Richard M. Troth.   This software was developed  00130000
  14.  *      with resources provided by Rice University and is intended      00140000
  15.  *      to serve Rice's user community.   Rice has benefitted greatly   00150000
  16.  *      from the free distribution of software,  therefore distribution 00160000
  17.  *      of unmodified copies of this material is not restricted.        00170000
  18.  *      You may change your own copy as needed.   Neither Rice          00180000
  19.  *      University nor any of its employees or students shall be held   00190000
  20.  *      liable for damages resulting from the use of this software.     00200000
  21.  */                                                                     00210000
  22.                                                                         00220000
  23. /*  Trace "OFF"  */                                                     00230000
  24.                                                                         00240000
  25. 'PEEKTO RECORD'                                                         00250000
  26. Select                                                                  00260000
  27.     When Left(record,5) = '4749463837'x Then Signal GIF                 00270000
  28.     Otherwise 'OUTPUT' "unknown graphics format"                        00280000
  29.     End  /*  Select  */                                                 00290000
  30.                                                                         00300000
  31. Exit rc * (rc ^= 12)                                                    00310000
  32.                                                                         00320000
  33.                                                                         00330000
  34.                                                                         00340000
  35. /* ------------------------------------------------------------------ */00350000
  36. GIF:                                                                    00360000
  37.                                                                         00370000
  38. /*  verify that we have the VMGIF disk accessed  */                     00380000
  39. 'CALLPIPE CMS STATE VMGIF MODULE * | *:'                                00390000
  40. If rc ^= 0 Then Exit rc                                                 00400000
  41.                                                                         00410000
  42. /*  try to stash the input stream in a temp file  */                    00420000
  43. 'CALLPIPE *: | > TEMP#GIF GIF A3'                                       00430000
  44. If rc ^= 0 Then Do                                                      00440000
  45.     grc = rc                                                            00450000
  46.     'CALLPIPE COMMAND ERASE TEMP#GIF GIF A'                             00460000
  47.     Exit grc                                                            00470000
  48.     End  /*  If  ..  Do  */                                             00480000
  49.                                                                         00490000
  50. /*  ensure that the right libraries are GLOBALed  */                    00500000
  51. /*  (I loathe doing this)  */                                           00510000
  52. 'CALLPIPE COMMAND QUERY TXTLIB' ,                                       00520000
  53.     '| STRIP LEADING STRING /TXTLIB   = / | JOIN * | VAR TXTLIB'        00530000
  54. Upper txtlib;   If Strip(txtlib) = "NONE" Then txtlib = ""              00540000
  55. 'CALLPIPE COMMAND GLOBAL TXTLIB ADMPLIB ADMGLIB' txtlib                 00550000
  56.                                                                         00560000
  57. /*  now run VMGIF  */                                                   00570000
  58. 'CALLPIPE CMS VMGIF -em5 TEMP#GIF | *:'; grc = rc                       00580000
  59.                                                                         00590000
  60. /*  restore GLOBALed libraries  */                                      00600000
  61. 'CALLPIPE COMMAND GLOBAL TXTLIB' txtlib                                 00610000
  62.                                                                         00620000
  63. Exit grc                                                                00630000
  64.                                                                         00640000
  65.